.react19-features {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.example-container {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
}

.example-container h4 {
  margin: 0 0 15px 0;
  color: #495057;
  border-bottom: 2px solid #007bff;
  padding-bottom: 8px;
}

/* 介绍部分 */
.intro-section {
  background-color: #e3f2fd;
  border: 1px solid #bbdefb;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 30px;
}

.intro-section p {
  margin: 0;
  color: #0d47a1;
  font-size: 16px;
}

/* 标签页导航 */
.tab-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 20px;
  border-bottom: 1px solid #dee2e6;
}

.tab-btn {
  background: none;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  font-size: 14px;
  color: #6c757d;
  border-bottom: 2px solid transparent;
  transition: all 0.3s;
  white-space: nowrap;
}

.tab-btn:hover {
  color: #007bff;
  background-color: #f8f9fa;
}

.tab-btn.active {
  color: #007bff;
  border-bottom-color: #007bff;
  background-color: #f8f9fa;
}

.tab-content {
  background-color: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 20px;
}

/* 控件样式 */
.controls {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.controls button {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s;
}

.controls button:hover {
  background-color: #0056b3;
}

.controls button:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
}

/* 用户显示样式 */
.user-display {
  background-color: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}

.user-info h3 {
  margin: 0 0 5px 0;
  color: #343a40;
}

.user-info p {
  margin: 0 0 5px 0;
  color: #6c757d;
}

.loading {
  text-align: center;
  padding: 40px;
  color: #6c757d;
}

/* 表单样式 */
.user-form,
.message-form,
.add-todo-form {
  background-color: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  color: #495057;
  font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 16px;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.form-group input:disabled,
.form-group textarea:disabled {
  background-color: #e9ecef;
  color: #6c757d;
}

.user-form button,
.message-form button,
.add-todo-form button {
  background-color: #28a745;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s;
}

.user-form button:hover,
.message-form button:hover,
.add-todo-form button:hover {
  background-color: #218838;
}

.user-form button:disabled,
.message-form button:disabled,
.add-todo-form button:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
}

/* 消息样式 */
.error-message {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  padding: 10px;
  margin-top: 10px;
}

.success-message {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  border-radius: 4px;
  padding: 10px;
  margin-top: 10px;
}

/* 聊天容器样式 */
.chat-container {
  background-color: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.messages {
  height: 300px;
  overflow-y: auto;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 15px;
  margin-bottom: 15px;
  background-color: #f8f9fa;
}

.message {
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 8px;
  max-width: 70%;
}

.message.sent {
  background-color: #007bff;
  color: white;
  margin-left: auto;
  text-align: right;
}

.message.received {
  background-color: #e9ecef;
  color: #343a40;
}

.message.sending {
  opacity: 0.7;
}

.message-text {
  display: block;
}

.sending-indicator {
  display: block;
  font-size: 12px;
  font-style: italic;
  margin-top: 5px;
}

.message-input-form {
  display: flex;
  gap: 10px;
}

.message-input {
  flex: 1;
  padding: 10px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 16px;
}

/* 搜索容器样式 */
.search-container {
  background-color: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.search-input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 16px;
  margin-bottom: 15px;
  box-sizing: border-box;
}

.search-indicator {
  color: #007bff;
  font-style: italic;
  margin-bottom: 15px;
}

.search-results {
  max-height: 300px;
  overflow-y: auto;
}

.search-result-item {
  padding: 15px;
  border-bottom: 1px solid #f1f3f4;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item h4 {
  margin: 0 0 5px 0;
  color: #343a40;
}

.search-result-item p {
  margin: 0;
  color: #6c757d;
  font-size: 14px;
}

/* 服务器组件样式 */
.server-component-demo {
  background-color: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.server-data {
  margin-top: 15px;
}

.server-data pre {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 15px;
  font-size: 12px;
  overflow-x: auto;
}

/* 待办事项样式 */
.todos-container {
  background-color: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.add-todo-form {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.add-todo-form input {
  flex: 1;
}

.todo-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.todo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  border-bottom: 1px solid #f1f3f4;
}

.todo-item:last-child {
  border-bottom: none;
}

.todo-item.completed .todo-text {
  text-decoration: line-through;
  color: #6c757d;
}

.todo-text {
  flex: 1;
  cursor: pointer;
  margin-right: 10px;
}

.delete-btn {
  background-color: #dc3545;
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.delete-btn:hover {
  background-color: #c82333;
}

/* 元数据表单样式 */
.metadata-form {
  background-color: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.metadata-info {
  background-color: #e9ecef;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 15px;
  margin-top: 15px;
}

.metadata-info p {
  margin: 0;
  color: #6c757d;
}

/* 资源加载样式 */
.resource-controls {
  margin-bottom: 20px;
}

.resource-display {
  background-color: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 20px;
}

.resource-data {
  margin-top: 15px;
}

.resource-data pre {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 15px;
  font-size: 12px;
  overflow-x: auto;
}

.placeholder {
  text-align: center;
  padding: 40px;
  color: #6c757d;
}

/* 功能描述样式 */
.feature-description {
  background-color: #e3f2fd;
  border: 1px solid #bbdefb;
  border-radius: 8px;
  padding: 15px;
  margin-top: 20px;
}

.feature-description p {
  margin: 5px 0;
  color: #0d47a1;
  font-size: 14px;
}

.feature-description strong {
  color: #01579b;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .tab-navigation {
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  
  .tab-btn {
    flex: 1;
    min-width: 120px;
    text-align: center;
  }
  
  .controls {
    flex-direction: column;
  }
  
  .user-card {
    flex-direction: column;
    text-align: center;
  }
  
  .message-input-form {
    flex-direction: column;
  }
  
  .add-todo-form {
    flex-direction: column;
  }
  
  .todo-item {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  
  .todo-text {
    margin-right: 0;
  }
}